<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//登录
Route::get('/login/fgregregrehytInnnIJNBGKNKJ', 'PassportController@login');
Route::post('/login/fgregregrehytInnnIJNBGKNKJ', 'PassportController@loginAction');

Route::match(['get', 'post'], '/entryguard', 'HomeController@entryguard');
//登出
Route::get('/logout', 'PassportController@logout');
//修改密码
Route::post('/pwdEidt', 'SystemController@pwdEidt');
// 图片验证码
Route::get('/captcha', 'AjaxController@captcha');
Route::post('/upload', 'AjaxController@upload');
//首页信息
Route::get('/', 'HomeController@profile');
Route::get('/home', 'HomeController@profile');

Route::group(['middleware' => ['permission:super|postings', 'entryguard']], function () {
//发送帖子
    Route::match(['get', 'post'], '/postings/post', 'PostingsController@post');
    Route::match(['get', 'post'], '/postings/post/timing', 'PostingsController@postTiming');
    //帖子列表
    Route::match(['get', 'post'], '/postings/postingsList', 'PostingsController@postingsList');
    Route::match(['get', 'post'], '/postings/detail/{custid}/{page}', 'PostingsController@detail');
    Route::match(['get', 'post'], '/posting/edit/{custid}', 'PostingsController@postEdit');
    Route::post('/post/postPicDel/{custid}', 'PostingsController@picDel');
    Route::post('/postings/posting', 'PostingsController@posting');
    Route::post('/posting/del/{custid}', 'PostingsController@postingDel');
    Route::post('/posting/cancle/{custid}', 'PostingsController@postingCancle');
    Route::post('/posting/jj/{custid}', 'PostingsController@postingJj');
    Route::post('/posting/qjj/{custid}', 'PostingsController@postingQjj');

    ###批量操作
    Route::post('/posting/alljj', 'PostingsController@postingAlljj');
    Route::post('/posting/allqjj', 'PostingsController@postingAllqjj');
    Route::post('/posting/alldel', 'PostingsController@postingAlldell');
    //回复楼层
    Route::post('/posting/rereply', 'PostingsController@postingRereply');
    Route::post('/posting/rereply/del/{id}', 'PostingsController@postingRereplyDel');
    Route::post('/posting/rereplys', 'PostingsController@postingRereplys');
    Route::post('/posting/rereplys/dels/{id}', 'PostingsController@postingRereplysDels');


    Route::match(['get', 'post'], '/postings/tongji', 'PostingsController@tongji');

});

#####消息推送
Route::group(['middleware' => ['permission:super|push', 'entryguard']], function () {
    //消息推送
    Route::get('/push/push', 'PushMessageController@push');
    Route::post('/push/push', 'PushMessageController@push');
    Route::post('/push/pushcs', 'PushMessageController@pushcs');
    Route::post('/push/mobile/message', 'PushMessageController@sendMobileMessage');
});

########店铺管理
Route::group(['middleware' => ['permission:super|discovery', 'entryguard']], function () {
    //发现
    Route::match(['get', 'post'], '/discovery/shopList', 'DiscoveryController@shopList');
    Route::match(['get', 'post'], '/discovery/shopPublish', 'DiscoveryController@shopPublish');
    Route::match(['get', 'post'], '/discovery/shopModify/{shopInfo}', 'DiscoveryController@shopModify');
    Route::post('/discovery/shopDel/{shop}', 'DiscoveryController@shopDel');
    Route::post('/shop/shopPicDel/{pic}', 'DiscoveryController@shopPicDel');

    Route::post("/shop/statusOn/{shopInfo}", "DiscoveryController@statusOn");
    Route::post("/shop/statusOff/{shopInfo}", "DiscoveryController@statusOff");
    //新信息审核
    Route::post("/shop/newStatusOn/{shopInfo}", "DiscoveryController@newStatusOn");
    Route::post("/shop/newStatusOff/{shopInfo}", "DiscoveryController@newStatusOff");
    Route::post("/shop/vipModify/{shopInfo}", "DiscoveryController@vipModify");

    Route::match(['get', 'post'], '/shop/config', 'DiscoveryController@storeConfig');

    Route::match(['get', 'post'], "/store/storeVip", "DiscoveryController@storeVipList");
    Route::post("/store/storeVip/publish", "DiscoveryController@storeVipPublish");
    Route::post("/store/storeVip/info/{vip}", "DiscoveryController@storeVipInfo");
    Route::post("/store/storeVip/modify/{vip}", "DiscoveryController@storeVipModify");

    //店铺类型
    Route::match(['get', 'post'], '/discovery/shopTypeList', 'DiscoveryController@shopTypeList');
    Route::match(['get', 'post'], '/discovery/shopTypePublish', 'DiscoveryController@shopTypePublish');
    Route::match(['get', 'post'], '/discovery/shopTypeModify/{shopinfo}', 'DiscoveryController@shopTypeModify');
    Route::post('/discovery/shopTypeDel/{shopType}', 'DiscoveryController@shopTypeDel');

    //商户提现
    Route::match(['get', 'post'], "/shop/withdraw/list", "ShanghuWithdrawController@withdrawList");
    Route::post("/shop/withdraw/done/{jkblShanghuWithdraw}", "ShanghuWithdrawController@withdrawDone");
    Route::post("/shop/withdraw/no/{jkblShanghuWithdraw}", "ShanghuWithdrawController@withdrawNo");

});
#########科室和话题
Route::group(['middleware' => ['permission:super|ksandht', 'entryguard']], function () {
    //科室
    Route::match(['get', 'post'], '/keshi/keshiList', "KsAndHtController@keshiList");
    Route::post('/keshi/keshiDel/{keshi}', 'KsAndHtController@keshiDel');
    Route::match(['get', 'post'], '/keshi/keshiModify/{keshi}', 'KsAndHtController@keshiModify');
    Route::match(['get', 'post'], '/keshi/keshiPublish', 'KsAndHtController@keshiPublish');

    //话题
    Route::match(['get', 'post'], '/huati/huatiList', "KsAndHtController@huatiList");
    Route::post('/huati/huatiDel/{huati}', 'KsAndHtController@huatiDel');
    Route::match(['get', 'post'], '/huati/huatiModify/{huati}', 'KsAndHtController@huatiModify');
    Route::match(['get', 'post'], '/huati/huatiPublish', 'KsAndHtController@huatiPublish');
    Route::match(['get', 'post'], '/huati/owner', 'KsAndHtController@huatiOwner');
    Route::post('/huati/owner/del/{id}', 'KsAndHtController@huatiOwnerDel');
    Route::post('/huati/owner/level', 'KsAndHtController@huatiOwnerLevel');
    Route::post('/huati/owner/add', 'KsAndHtController@huatiOwnerAdd');

    //父级话题
    Route::match(['get', 'post'], '/huatip/huatipList', "KsAndHtController@huatipList");
    Route::post('/huatip/huatipDel/{huati}', 'KsAndHtController@huatipDel');
    Route::match(['get', 'post'], '/huatip/huatipModify/{huati}', 'KsAndHtController@huatipModify');
    Route::match(['get', 'post'], '/huatip/huatipPublish', 'KsAndHtController@huatipPublish');
});


###########商品管理
Route::group(['middleware' => ['permission:super|commodity', 'entryguard']], function () {
    //商品
    Route::match(['get', 'post'], '/commodity/commoditiesList', 'CommodityController@commoditiesList');

    Route::match(['get', 'post'], '/commodity/commodityPublish', 'CommodityController@commodityPublish');
    Route::match(['get', 'post'], '/commodity/commodityModify/{commodity}', 'CommodityController@commodityModify');
    Route::post('/commodity/commodityDel/{commodity}', 'CommodityController@commodityDel');
    Route::post('/commodity/commodityPicDel/{commodity}', 'CommodityController@commodityPicDel');

});

############系统管理
Route::group(['middleware' => ['permission:super|system', 'entryguard']], function () {
    //管理员
    Route::match(['get', 'post'], '/system/admin', 'SystemController@admin');
    Route::post('/system/adminAdd', 'SystemController@adminAdd');
    Route::match(['get', 'post'], '/system/admin/detail/{admin}', 'SystemController@adminDetail');
    Route::post('/system/admin/del/{admin}', 'SystemController@adminDel');
    //角色
    Route::match(['get', 'post'], '/system/roles', 'SystemController@roles');
    Route::post('/system/roles/publish', 'SystemController@rolesPublish');
    Route::post('/system/roles/edit', 'SystemController@rolesEdit');
    Route::post('/system/roles/del/{role}', 'SystemController@rolesDel');
    Route::post('/system/roles/chk/{role}', 'SystemController@rolesChk');
    //权限
    Route::match(['get', 'post'], '/system/permissions', 'SystemController@permissions');
    Route::post('/system/permissions/publish', 'SystemController@permissionsPublish');
    Route::post('/system/permissions/edit', 'SystemController@permissionsEdit');
    Route::post('/system/permissions/del/{permission}', 'SystemController@permissionsDel');
    Route::post('/system/permissions/chk/{permission}', 'SystemController@permissionsChk');

    //
    Route::match(['get', 'post'], '/system/appConfig', 'SystemController@appConfig');
});

#########活动管理
Route::group(['middleware' => ['permission:super|activity', 'entryguard']], function () {
    //活动列表
    Route::match(['get', 'post'], '/activity/activityList', 'ActivityController@activityList');
    //添加活动
    Route::match(['get', 'post'], '/activity/activityPublish', 'ActivityController@activityPublish');
    //修改
    Route::match(['get', 'post'], '/activity/activityModify/{activity}', 'ActivityController@activityModify');
    //删除
    Route::post('/activity/activityDel/{activity}', 'ActivityController@activityDel');
});

#########团购管理
Route::group(['middleware' => ['permission:super|promotion', 'entryguard']], function () {
    Route::match(['get', 'post'], '/promotion/promotionList', 'PromotionController@promotionList');
    Route::match(['get', 'post'], '/promotion/send/list/{commodity}', 'PromotionController@promotionSendList');
    Route::post('/promotion/promotionSend', 'PromotionController@promotionSend');


    //普通订单
    Route::match(['get', 'post'], '/promotion/orderList', 'PromotionController@orderList');
});

Route::group(['middleware' => ['permission:super|operationRecord', 'entryguard']], function () {
    //提现列表
    Route::match(['get', 'post'], '/operationRecord/list', 'OperationRecordController@operationRecordList');
    Route::match(['get', 'post'], '/operationRecord/no/{operationRecord}', 'OperationRecordController@operationRecordNo');
    Route::match(['get', 'post'], '/operationRecord/yes/{operationRecord}', 'OperationRecordController@operationRecordYes');
	
	Route::match(['get', 'post'], '/operationRecord/tongjilist', 'OperationRecordController@tongjiList');
    //实体商品
    Route::post('/operation/realdetail/{operationRecord}', 'OperationRecordController@operationRealDetail');
    Route::post('/operationRecord/deliver/{operationRecord}', 'OperationRecordController@operationRealDeliver');

    //用户轨迹
    Route::match(['get', 'post'], '/user/operation/list', 'OperationRecordController@userOperationList');

    //积分商品
    Route::match(['get', 'post'], '/integralCommodity/list', 'IntegralCommodityController@commadityList');
    Route::match(['get', 'post'], '/integralCommodity/publish', 'IntegralCommodityController@commadityPublish');
    Route::match(['get', 'post'], '/integral/detail/{integralCommodity}', 'IntegralCommodityController@commadityDetail');
    Route::post('/integral/del/{integralCommodity}', 'IntegralCommodityController@commadityDel');

    //积分抽奖列表
    Route::match(['get', 'post'], '/operationRecord/luckdraw/list', 'OperationRecordController@operationRecordLuckdrawList');
    Route::post('/operationRecord/luckdraw/refuse/{prizeRecords}', 'OperationRecordController@operationRecordLuckdrawRefuse');
    Route::post('/operationRecord/luckdraw/agree/{prizeRecords}', 'OperationRecordController@operationRecordLuckdrawAgree');
    Route::post('/operationRecord/luckdraw/info/{prizeRecords}', 'OperationRecordController@luckdrawInfo');


    #####批量通过
    Route::post('/operationRecord/aliall', 'OperationRecordController@aliAll');
    Route::post('/operationRecord/allwechat', 'OperationRecordController@wechatAll');

    Route::match(['get', 'post'], '/operationRecord/tasks', 'OperationRecordController@tasks');
    Route::post('/operationRecord/tasksInfo/{id}', 'OperationRecordController@tasksInfo');
    Route::post('/operationRecord/tasksEdit/{id}', 'OperationRecordController@tasksEdit');
	
	//签到设置
	 Route::match(['get', 'post'], '/operationRecord/set', 'OperationRecordController@set');
});

Route::group(['middleware' => ['permission:super|banner', 'entryguard']], function () {
    ###APPbanner
    Route::match(['get', 'post'], '/banner/list', "BannerController@bannerList");
    Route::post('/banner/bannerDel/{banner}', "BannerController@bannerDel");
    Route::match(['get', 'post'], '/banner/bannerPublish', "BannerController@bannerPublish");
    Route::match(['get', 'post'], '/banner/bannerModify/{banner}', "BannerController@bannerModify");

    ###商城banner
    Route::match(['get', 'post'], '/banner2/list', "BannerController@banner2List");
    Route::post('/banner2/bannerDel/{banner}', "BannerController@banner2Del");
    Route::match(['get', 'post'], '/banner2/bannerPublish', "BannerController@banner2Publish");
    Route::match(['get', 'post'], '/banner2/bannerModify/{banner}', "BannerController@banner2Modify");

    Route::match(['get', 'post'], '/banner/pic/list', "BannerController@bannerPicList");
    Route::match(['get', 'post'], '/banner/pic/add', "BannerController@bannerPicAdd");
});

###user
Route::group(['middleware' => ['permission:super|user', 'entryguard']], function () {
    Route::match(['get', 'post'], '/user/list', "UserController@userList");
    Route::post('/user/banoff/{c_id}', "UserController@userBanoff");
    Route::post('/user/banon/{c_id}', "UserController@userBanon");

    Route::match(['get', 'post'], '/behaviorLog/behaviorLog', "BehaviorLogController@behaviorLog");
    Route::match(['get', 'post'], '/behaviorLog/loginLog', "BehaviorLogController@loginLog");
});

####举报
Route::group(['middleware' => ['permission:super|report', 'entryguard']], function () {
    //被举报的文章列表
    Route::match(['get', 'post'], '/report/list', 'ReportController@reportList');
});
####举报
Route::group(['middleware' => ['permission:super|activities', 'entryguard']], function () {
    //被举报的文章列表
    Route::match(['get', 'post'], '/activities/autumn2018', 'ActivitiesController@autumn2018');
});


Route::group(['middleware' => ['permission:super|healthAdvice', 'entryguard']], function () {
    Route::match(['get', 'post'], '/healthAdvice/list', 'HealthAdviceController@lists');
    Route::post('/healthAdvice/del/{healthAdvice}', 'HealthAdviceController@healthAdviceDel');
    Route::post('/healthAdvice/hot/{healthAdvice}', 'HealthAdviceController@healthAdviceHot');
    Route::post('/healthAdvice/hotoff/{healthAdvice}', 'HealthAdviceController@healthAdviceHotoff');
    Route::match(['get', 'post'], '/healthAdvice/publish', 'HealthAdviceController@publish');
    Route::match(['get', 'post'], '/healthAdvice/modify/{healthAdvice}', 'HealthAdviceController@modify');


    Route::match(['get', 'post'], '/healthAdvice/videoList', 'HealthAdviceController@videoList');
    Route::match(['get', 'post'], '/healthAdvice/videoPublish', 'HealthAdviceController@videoPublish');


    Route::match(['get', 'post'], '/healthAdvice/typeList', 'HealthAdviceController@typeList');
    Route::post('/healthAdvice/typeAdd', 'HealthAdviceController@typeAdd');
    Route::post('/healthAdvice/typeDel/{id}', 'HealthAdviceController@typeDel');
    Route::post('/healthAdvice/picDel/{id}', 'HealthAdviceController@picDel');

    //回复
    Route::match(['get', 'post'], '/healthAdvice/repay/{healthAdvice}', 'HealthAdviceController@repay');
//    Route::post('/healthAdvice/repay', 'HealthAdviceController@repay');
    Route::post('/healthAdvice/repays', 'HealthAdviceController@repays');
});


############游戏
Route::group(['middleware' => ['permission:super|game', 'entryguard']], function () {
    //游戏列表
    Route::match(['get', 'post'], '/game/list', 'GameController@gameList');
    //添加游戏
    Route::match(['get', 'post'], '/game/publish', 'GameController@gamePublish');
    //游戏详情
    Route::match(['get', 'post'], '/game/gameInfo/{game}', 'GameController@gameInfo');
    Route::post('/game/gameInfo/{game}/status', 'GameController@gameStatusList');
    Route::post('/game/gameInfo/{game}/commodity', 'GameController@gameCommodityList');
    Route::post('/game/gameDelflag/{game}', 'GameController@gameDelflag');

    //游戏状态
    Route::match(['get', 'post'], '/game/status/info/{gameStatus}', 'GameController@statusInfo');
    Route::match(['get', 'post'], '/game/status/publish/{gameStatus}', 'GameController@statusPublish');
    Route::post('/game/status/del/{gameStatus}', 'GameController@statusDel');


    //游戏奖励
    Route::match(['get', 'post'], '/game/commodity/info/{gameCommodity}', 'GameController@commodityInfo');
    Route::match(['get', 'post'], '/game/commodity/publish/{gameCommodity}', 'GameController@commodityPublish');
    Route::post('/game/commodity/del/{gameCommodity}', 'GameController@commodityDel');

    //游戏奖励领取
    Route::match(['get', 'post'], '/game/prizeLog', 'GameController@prizeList');
    Route::post('/game/prize/refuse/{gamePrizeLog}', 'GameController@prizeRefuse');
    Route::post('/game/prize/agree/{gamePrizeLog}', 'GameController@prizeAgree');
    Route::post('/game/prize/info/{gamePrizeLog}', 'GameController@prizeInfo');
	
    //游戏图片
    Route::match(['get', 'post'], '/game/piclist', "GameController@picList");
    Route::post('/game/picDel/{banner}', "GameController@picDel");
    Route::match(['get', 'post'], '/game/picPublish', "GameController@picPublish");
    Route::match(['get', 'post'], '/game/picModify/{Gamepic}', "GameController@picModify");	
});

Route::group(['middleware' => ['permission:super|healthRecords', 'entryguard']], function () {
    Route::match(['get', 'post'], '/healthRecords/list', 'HealthRecordsController@healthRecordsList');
    Route::get('/healthRecords/info/{healthRecords}', 'HealthRecordsController@healthRecordsInfo');


    Route::post("/healthRecords/statusOn/{healthRecords}", "HealthRecordsController@statusOn");
    Route::post("/healthRecords/statusOff/{healthRecords}", "HealthRecordsController@statusOff");
    //新信息审核
    Route::post("/healthRecords/newStatusOn/{healthRecords}", "HealthRecordsController@newStatusOn");
    Route::post("/healthRecords/newStatusOff/{healthRecords}", "HealthRecordsController@newstatusOff");
});


Route::group(['middleware' => ['permission:super|apply', 'entryguard']], function () {
    Route::match(['get', 'post'], '/apply/vip', 'ApplyController@applyVip');
    Route::match(['get', 'post'], '/apply/try', 'ApplyController@applyTry');
    Route::match(['get', 'post'], '/apply/basevip', 'ApplyController@baseApplyVip');
});

Route::group(['middleware' => ['permission:super|rungame', 'entryguard']], function () {
    Route::match(['get', 'post'], '/runGame/config', 'RunGameController@config');
    Route::post('/runGame/role', 'RunGameController@role');
    Route::post('/runGame/role/add', 'RunGameController@roleAdd');
    Route::post('/runGame/role/del/{runGameRole}', 'RunGameController@roleDel');


    Route::match(['get', 'post'], '/runGame/items', 'RunGameController@items');
    Route::post('/runGame/items/add', 'RunGameController@itemsAdd');

    Route::match(['get', 'post'], '/runGame/seasons', 'RunGameController@seasons');
    Route::post('/runGame/seasons/add', 'RunGameController@seasonsAdd');
    Route::post('/runGame/seasons/del/{runGameSeason}', 'RunGameController@seasonsDel');
    Route::match(['get', 'post'], '/runGame/seasons/info/{runGameSeason}', 'RunGameController@seasonsInfo');
    Route::post('/runGame/seasons/info/{runGameSeason}/reward', 'RunGameController@seasonsReward');

    Route::match(['get', 'post'], '/runGame/reward', 'RunGameController@reward');
    Route::post('/runGame/reward/add', 'RunGameController@rewardAdd');
    Route::post('/runGame/reward/del/{runGameReward}', 'RunGameController@rewardDel');

    Route::match(['get', 'post'], '/runGame/price', 'RunGameController@price');
    Route::post('/runGame/price/detail/{runGamePrize}', 'RunGameController@priceDetail');
    Route::post('/runGame/price/send/{runGamePrize}', 'RunGameController@priceSend');

    Route::match(['get', 'post'], '/runGame/gameLog', 'RunGameController@gameLog');
    Route::match(['get', 'post'], '/runGame/rank', 'RunGameController@gameRank');
});


Route::group(['middleware' => ['permission:super|market']], function () {
    Route::match(['post', 'get'],'/market/rotery/markets', 'MarketRoteryController@marketList');
    Route::post('/market/markets/publish', 'MarketRoteryController@marketPublish');
    Route::post('/market/markets/info/{marketList}', 'MarketRoteryController@marketInfo');
    Route::post('/market/markets/modify/{marketList}', 'MarketRoteryController@marketModify');
});



#############医生管理
Route::group(['middleware' => ['permission:super|doctor', 'entryguard']], function () {
    //擅长领域
    Route::match(['get', 'post'], '/doctor/expert', 'DoctorController@doctorExpert');
    Route::post('/doctor/expert/publish', 'DoctorController@doctorExpertPublish');
    Route::post('/doctor/expert/del/{doctorExpert}', 'DoctorController@doctorExpertDel');
    Route::post('/doctor/expert/modify/{doctorExpert}', 'DoctorController@doctorExpertModify');

    //医生类型
    Route::match(['get', 'post'], '/doctor/type', 'DoctorController@doctorType');
    Route::post('/doctor/type/publish', 'DoctorController@doctorTypePublish');
    Route::post('/doctor/type/del/{doctorType}', 'DoctorController@doctorTypeDel');
    Route::post('/doctor/type/status/modify/{doctorType}', 'DoctorController@doctorTypeStatusModify');
    Route::post('/doctor/type/qual/modify/{doctorType}', 'DoctorController@doctorTypeQualModify');

    //医生管理
    Route::match(['get', 'post'], '/doctor/list', 'DoctorController@doctorList');
    Route::post('/doctor/del/{doctor}', 'DoctorController@doctorDel');
    Route::get('/doctor/info/{doctor}', 'DoctorController@doctorInfo');

    Route::post("/doctor/statusOn/{doctor}", "DoctorController@statusOn");
    Route::post("/doctor/statusOff/{doctor}", "DoctorController@statusOff");
    //新信息审核
    Route::post("/doctor/newStatusOn/{doctor}", "DoctorController@newStatusOn");
    Route::post("/doctor/newStatusOff/{doctor}", "DoctorController@statusOff");
});


Route::group(['middleware' => ['permission:super|jkblTimingConfig', 'entryguard']], function () {
    Route::match(['get', 'post'], '/jkblTimingConfig/config', 'JkblTimingConfigController@config');
});



Route::group(['middleware' => ['permission:super|agreement', 'entryguard']], function () {
    Route::get('/agreement/agreement/{type}', 'JkblWenbenController@agreement');
    Route::post('/agreement/agreement/{jkblWenben}', 'JkblWenbenController@agreementEdit');
});


Route::group(['middleware' => ['permission:super|ad', 'entryguard']], function () {
    Route::match(['get', 'post'], '/ad/companies/list', 'AdController@companiesList');
    Route::post('/ad/company/publish', 'AdController@companyPublish');
    Route::post('/ad/company/del/{adCompanies}', 'AdController@companyDel');

    Route::match(['get', 'post'], '/ad/list', 'AdController@adList');
    Route::post('/ad/ad/publish', 'AdController@adPublish');
    Route::post('/ad/ad/info/{adList}', 'AdController@adInfo');
    Route::post('/ad/ad/modify/{adList}', 'AdController@adModify');
    Route::post('/ad/ad/del/{adList}', 'AdController@adDel');
});

###jiankang
Route::group(['middleware' => ['permission:super|jiankang', 'entryguard']], function () {
    Route::match(['get', 'post'], '/jiankang/list', 'JkangController@jkList');
	Route::post('/jiankang/del/{id}', "JkangController@jkDel");
	Route::match(['get', 'post'], '/jiankang/jkModify/{HealthyNum}', 'JkangController@jkModify');
	Route::match(['get', 'post'], '/jiankang/jkPublish', 'JkangController@jkPublish');
});

############资讯模块
Route::group(['middleware' => ['permission:super|zixun', 'entryguard']], function () {
    //分类
    Route::match(['get', 'post'], '/zixun/fenlei', 'ZixunController@fenleiList');
	Route::post('/zixun/dels/{id}', "ZixunController@fenleiDels");
	Route::post('/zixun/shuaxin/{id}', "ZixunController@fenleiShuaxin");
	Route::match(['get', 'post'], '/zixun/fenleiModify/{zixun}', 'ZixunController@fenleiModify');
	Route::match(['get', 'post'], '/zixun/fenleiPublish', 'ZixunController@fenleiPublish');
	//资讯列表
	Route::match(['get', 'post'], '/zixun/zxlist', 'ZixunController@zxList');
	Route::match(['get', 'post'], '/zixun/zxlistPublish', 'ZixunController@zxlistPublish');
	Route::match(['get', 'post'], '/zixun/zxlistModify/{Zxlists}', 'ZixunController@zxlistModify');
	Route::post('/zixun/del/{id}', "ZixunController@zxlistDel");	
    Route::post('/zixun/hot/{Zxlists}', 'ZixunController@zxHot');
    Route::post('/zixun/hotoff/{Zxlists}', 'ZixunController@zxHotoff');	
	Route::post('/zixun/zxpicdel/{id}', "ZixunController@picDel");
	Route::post('/zixun/chexiao/{id}', "ZixunController@chexiaodel");
	
	//资讯定时发送
	Route::match(['get', 'post'], '/zixun/timeposing', 'ZixunController@zxtimePublish');
	
	//资讯评论
	Route::match(['get', 'post'], '/zixun/repay/{Zxlists}', 'ZixunController@zxrepay');
	Route::match(['get', 'post'], '/zixun/addrepay/{Zxlists}', 'ZixunController@zxaddrepay');
	Route::post('/zixun/zxpdel/{id}', "ZixunController@zxreplyDel");
	
	//资讯评论回复
	Route::match(['get', 'post'], '/zixun/zxhuifu/{id}', 'ZixunController@zxhuifus');
	Route::post('/zixun/zxcpdel/{id}', "ZixunController@zxcomreplyDel");
	
	//bannner
	Route::match(['get', 'post'], '/zixun/banner', 'ZixunController@bannerList');
	Route::match(['get', 'post'], '/zixun/bannerPublish', 'ZixunController@bannerPublish');
	Route::match(['get', 'post'], '/zixun/bannerModify/{Zxbanner}', 'ZixunController@bannerModify');
	Route::post('/zixun/bannerdel/{Zxbanner}', "ZixunController@bannerDel");
	//工具
	Route::match(['get', 'post'], '/zixun/tool', 'ZixunController@toolList');
	Route::match(['get', 'post'], '/zixun/toolPublish', 'ZixunController@toolPublish');
	Route::match(['get', 'post'], '/zixun/toolModify/{tool}', 'ZixunController@toolModify');
	Route::post('/zixun/tooldel/{id}', "ZixunController@toolDel");
	Route::post('/zixun/toolshuaxin/{id}', "ZixunController@toolshuaxin");
	//专题分类/zixun/ztfenlei
	Route::match(['get', 'post'], '/zixun/ztfenlei', 'ZixunController@ztfenleiList');
	Route::match(['get', 'post'], '/zixun/ztfenleiPublish', 'ZixunController@ztfenleiPublish');
	Route::match(['get', 'post'], '/zixun/ztfenleiModify/{Ztfenlei}', 'ZixunController@ztfenleiModify');
	Route::post('/zixun/ztfenleidel/{id}', "ZixunController@ztfenleiDel");	
	Route::post('/zixun/ztflshuaxin/{id}', "ZixunController@ztflshuaxin");
	//专题列表
	Route::match(['get', 'post'], '/zixun/ztlist', 'ZixunController@ztList');
	Route::match(['get', 'post'], '/zixun/ztlistPublish', 'ZixunController@ztlistPublish');
	Route::match(['get', 'post'], '/zixun/ztlistModify/{Ztlist}', 'ZixunController@ztlistModify');
	Route::post('/zixun/ztlistdel/{id}', "ZixunController@ztlistDel");
	Route::post('/zixun/ztlistshuaxin/{id}', "ZixunController@ztlistshuaxin");
	//专题列表banner
	Route::match(['get', 'post'], '/zixun/listBanner/{Ztlist}', 'ZixunController@ztlistBanner');
	Route::match(['get', 'post'], '/zixun/listbannerPublish/{Ztlist}', 'ZixunController@listbannerPublish');
	Route::match(['get', 'post'], '/zixun/listbannerModify/{Ztbanner}', 'ZixunController@listbannerModify');
	Route::post('/zixun/listbannerdel/{id}', "ZixunController@listbannerDel");
	//专题底部文章
	Route::match(['get', 'post'], '/zixun/artlist/{Ztlist}', 'ZixunController@artlist');
	Route::match(['get', 'post'], '/zixun/artPublish/{Ztlist}', 'ZixunController@artPublish');
	Route::match(['get', 'post'], '/zixun/artModify/{Ztarticle}', 'ZixunController@artModify');
	Route::post('/zixun/artdel/{id}', "ZixunController@artDel");	
	//专题底部圈子文章
	Route::match(['get', 'post'], '/zixun/arcirtlist/{Ztlist}', 'ZixunController@arcirtlist');
	Route::match(['get', 'post'], '/zixun/artcirPublish/{Ztlist}', 'ZixunController@artcirPublish');
	Route::match(['get', 'post'], '/zixun/artcirtModify/{Ztcirarticle}', 'ZixunController@artcirtModify');
	Route::post('/zixun/artcirdel/{id}', "ZixunController@artcirdel");	
});

############圈子模块
Route::group(['middleware' => ['permission:super|quanzi', 'entryguard']], function () {
    //圈子分类
    Route::match(['get', 'post'], '/quanzi/fenlei', 'QuanziController@fenleiList');
	Route::post('/quanzi/del/{id}', "QuanziController@fenleiDel");
	Route::post('/quanzi/shuaxin/{id}', "QuanziController@shuaxin");
	Route::match(['get', 'post'], '/quanzi/fenleiModify/{Qfenglei}', 'QuanziController@fenleiModify');
	Route::match(['get', 'post'], '/quanzi/fenleiPublish', 'QuanziController@fenleiPublish');
	
	//圈子列表
	Route::match(['get', 'post'], '/quanzi/list', 'QuanziController@zxList');
	Route::match(['get', 'post'], '/quanzi/zxlistPublish', 'QuanziController@zxlistPublish');
	Route::match(['get', 'post'], '/quanzi/zxlistModify/{Carticle}', 'QuanziController@zxlistModify');
	Route::post('/quanzi/listdel/{id}', "QuanziController@zxlistDel");	
	Route::post('/quanzi/chexiao/{id}', "QuanziController@chexiaoDel");	
	
	
	//定时发送
	Route::match(['get', 'post'], '/quanzi/timeposing', 'QuanziController@qztimePublish');
	
    Route::post('/quanzi/hot/{Carticle}', 'QuanziController@zxHot');//加精
    Route::post('/quanzi/hotoff/{Carticle}', 'QuanziController@zxHotoff');//取消加精	
	
    Route::post('/quanzi/top/{Carticle}', 'QuanziController@zxTop');//置顶
    Route::post('/quanzi/topoff/{Carticle}', 'QuanziController@zxTopoff');//取消置顶	
	//圈子图片列表
	Route::post('/quanzi/listpicdel/{id}', "QuanziController@picDel");
	//圈子评论
	Route::match(['get', 'post'], '/quanzi/repay/{Carticle}', 'QuanziController@czrepay');
	Route::match(['get', 'post'], '/quanzi/repayPublish/{Carticle}', 'QuanziController@repayPublish');
	Route::post('/quanzi/zxpdel/{id}', "QuanziController@czreplyDel");
	
	//圈子评论回复
	Route::match(['get', 'post'], '/quanzi/zxhuifu/{id}', 'QuanziController@czhuifus');
	Route::post('/quanzi/zxcpdel/{id}', "QuanziController@czcomreplyDel");
});

############打卡模块
Route::group(['middleware' => ['permission:super|punch', 'entryguard']], function () {
    //打卡配置
    Route::match(['get', 'post'], '/punch/list', 'PunchController@peizhiList');
	Route::post('/punch/dels/{id}', "PunchController@peizhiiDels");
	Route::match(['get', 'post'], '/punch/peizhiModify/{Cpeizhi}', 'PunchController@peizhiModify');
	Route::match(['get', 'post'], '/punch/peizhiPublish', 'PunchController@peizhiPublish');
	Route::match(['get', 'post'], '/punch/pzstatuson/{id}', 'PunchController@pzstatuson');
	Route::match(['get', 'post'], '/punch/pzstatusoff/{id}', 'PunchController@pzstatusoff');
	
    Route::match(['get', 'post'], '/punch/recode/{id}', 'PunchController@peizhirecode');
	
	Route::match(['get', 'post'], '/punch/tongji', 'PunchController@peizhitongji');

});

Route::any('test', function () {
    dd(getdate());

});
use App\MarketRotaryUser;
use App\User;
Route::match(['post', 'get'], '/market/search/{id}', function ($id) {
    $user_union_ids = MarketRotaryUser::where('market_id', $id)->pluck('user_union_id')->toArray();
    $user_ids = User::whereIn('union_id', $user_union_ids)->pluck('c_id')->toArray();
    $duwnload = DB::table('login_log')->whereIn('user_id', $user_ids)->groupBy('user_id')->getCountForPagination();
        echo "<p style='font-size: xx-large'>" . '扫码人数：' . count($user_union_ids) . '。 下载人数' . $duwnload . "</p>";
});
